Optimal. Leaf size=78 \[ \frac {3 \cot (c+d x)}{a^3 d}+\frac {4 \cos (c+d x)}{a^3 d (\sin (c+d x)+1)}-\frac {9 \tanh ^{-1}(\cos (c+d x))}{2 a^3 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.25, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2875, 2872, 3770, 3767, 8, 3768, 2648} \[ \frac {3 \cot (c+d x)}{a^3 d}+\frac {4 \cos (c+d x)}{a^3 d (\sin (c+d x)+1)}-\frac {9 \tanh ^{-1}(\cos (c+d x))}{2 a^3 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2648
Rule 2872
Rule 2875
Rule 3767
Rule 3768
Rule 3770
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \cot ^3(c+d x)}{(a+a \sin (c+d x))^3} \, dx &=\frac {\int \csc ^3(c+d x) \sec ^2(c+d x) (a-a \sin (c+d x))^3 \, dx}{a^6}\\ &=\frac {\int \left (4 a \csc (c+d x)-3 a \csc ^2(c+d x)+a \csc ^3(c+d x)-\frac {4 a}{1+\sin (c+d x)}\right ) \, dx}{a^4}\\ &=\frac {\int \csc ^3(c+d x) \, dx}{a^3}-\frac {3 \int \csc ^2(c+d x) \, dx}{a^3}+\frac {4 \int \csc (c+d x) \, dx}{a^3}-\frac {4 \int \frac {1}{1+\sin (c+d x)} \, dx}{a^3}\\ &=-\frac {4 \tanh ^{-1}(\cos (c+d x))}{a^3 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^3 d}+\frac {4 \cos (c+d x)}{a^3 d (1+\sin (c+d x))}+\frac {\int \csc (c+d x) \, dx}{2 a^3}+\frac {3 \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^3 d}\\ &=-\frac {9 \tanh ^{-1}(\cos (c+d x))}{2 a^3 d}+\frac {3 \cot (c+d x)}{a^3 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^3 d}+\frac {4 \cos (c+d x)}{a^3 d (1+\sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 5.90, size = 213, normalized size = 2.73 \[ -\frac {\sin ^8\left (\frac {1}{2} (c+d x)\right ) \sin ^7(c+d x) \left (\csc ^2\left (\frac {1}{2} (c+d x)\right )+2 \csc (c+d x)\right )^5 \left ((\csc (c+d x)-6) \csc ^6\left (\frac {1}{2} (c+d x)\right )-8 (\csc (c+d x)-6) \csc ^3(c+d x)+2 \csc (c+d x) \csc ^4\left (\frac {1}{2} (c+d x)\right ) \left (\csc (c+d x)-18 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+18 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-6\right )-4 \csc ^2(c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right ) \left (\csc (c+d x)+18 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-18 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-38\right )\right )}{512 a^3 d (\sin (c+d x)+1)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.45, size = 246, normalized size = 3.15 \[ \frac {28 \, \cos \left (d x + c\right )^{3} + 18 \, \cos \left (d x + c\right )^{2} - 9 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 9 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, {\left (14 \, \cos \left (d x + c\right )^{2} + 5 \, \cos \left (d x + c\right ) - 8\right )} \sin \left (d x + c\right ) - 26 \, \cos \left (d x + c\right ) - 16}{4 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + a^{3} d \cos \left (d x + c\right )^{2} - a^{3} d \cos \left (d x + c\right ) - a^{3} d + {\left (a^{3} d \cos \left (d x + c\right )^{2} - a^{3} d\right )} \sin \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 116, normalized size = 1.49 \[ \frac {\frac {36 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{3}} + \frac {64}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}} - \frac {54 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1}{a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}} + \frac {a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.68, size = 115, normalized size = 1.47 \[ \frac {\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d \,a^{3}}-\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d \,a^{3}}-\frac {1}{8 d \,a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {3}{2 d \,a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+\frac {9 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{3}}+\frac {8}{d \,a^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.33, size = 161, normalized size = 2.06 \[ \frac {\frac {\frac {11 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {76 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1}{\frac {a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{3} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}} - \frac {\frac {12 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{a^{3}} + \frac {36 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.69, size = 120, normalized size = 1.54 \[ \frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^3\,d}+\frac {9\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,a^3\,d}+\frac {38\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {11\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}-\frac {1}{2}}{d\,\left (4\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+4\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^3\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________